# nodes=(
#    10.13.149.4
#    10.13.146.225
#    10.13.149.144
#    10.13.149.2
#    10.13.149.13
#    10.13.149.17
#    10.13.149.18
#    10.13.149.20
#    10.13.149.21
#    10.13.149.23
#    10.13.149.158
#    10.13.149.162
# )

# nodes=(
#    10.13.149.2
#    10.13.149.13
#    10.13.149.17
#    10.13.149.18
#    10.13.149.20
# )

# nodes=(
#    10.13.149.25
#    10.13.149.26
#    10.13.149.27
#    10.13.149.28
#    10.13.149.145
# )

# nodes=(
#    10.13.149.25
#    10.13.149.26
#    10.13.149.27
#    10.13.149.28
#    10.13.149.145
#    10.13.149.146
#    10.13.149.147
#    10.13.149.148
#    10.13.149.149
#    10.13.149.151
#    10.13.146.235
#    10.13.146.236
#    10.13.146.237
#    10.13.146.238
#    10.13.146.239
#    10.13.149.18
#    10.13.149.20
# )


nodes=(
   10.13.149.25
   10.13.149.26
   10.13.149.27
   10.13.149.28
   10.13.149.145
   10.13.149.146
   10.13.149.147
   10.13.149.148
   10.13.149.149
   10.13.149.151
)
for node in "${nodes[@]}"; do
   echo $node
   ssh root@$node << remotessh
   pkill -f 'hydit/train_deepspeed_controlnet.py'
remotessh
done
